<template>
  <div class="not-found">
    <!-- 结构 -->
    <h1>找不到</h1>
    <p>很抱歉，你访问的页面不存在。</p>
    <button @click="$router.push('/')">返回主页</button>
  </div>
</template>

<script>
// 组件的注册使用步骤：
// 1. 创建组件 (创建vue文件)
//   2. 导入组件 (script -> import导入)
//   3. 注册组件 (script -> components注册)
//   4. 使用组件 (template -> 使用)
export default {
  // 行为
}
</script>

<style scoped>
/* 样式 */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-size: 24px;
  color: #333;
  animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

button:hover {
  background-color: #0056b3;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}
</style>
